<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>柯小龙的前端知识库</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="author" content="柯小龙" />
    <meta name="description" content="柯小龙的前端知识库" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
    />
    <link
      rel="stylesheet"
      type="text/css"
      href="http://cdn.jsdelivr.net/npm/docsify/themes/vue.css"
    />
  </head>
  <body>
    <div id="app">加载中……</div>
    <script type="text/javascript">
      // 定义常量
      const DOCSIFY_URL = 'https://github.com/docsifyjs/docsify';
      const BUILDER_URL = 'https://github.com/xxxxue/Docsify-Build-Sidebar';
      const GITEE_URL = 'https://gitee.com/kexiaolong';
      const REPO_URL = `${GITEE_URL}/front-knowledges`;
      const DOC_URL = 'https://kexiaolong.gitee.io/front-knowledges/';
      // docsify配置
      window.$docsify = {
        // 基础
        //logo: '/_media/icon.svg',
        name: '前端知识库',
        nameLink: DOC_URL,
        repo: REPO_URL,
        // 侧边栏
        maxLevel: 6,
        subMaxLevel: 4,
        // 布局
        coverpage: false,
        onlyCover: false,
        loadNavbar: false,
        loadSidebar: true,
        notFoundPage: false,
        // 自动跳转到顶部
        auto2top: true,
        // 内容搜索
        search: {
          maxAge: 86400000,
          noData: '找不到结果',
          paths: 'auto',
          placeholder: '文档内搜索',
        },
        // 字数统计
        count: {
          countable: true,
          fontsize: '1rem',
          color: 'rgb(90, 90, 90)',
          language: 'chinese',
        },
        // 时间格式
        formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}/{ss}',
        // 钩子函数
        plugins: [
          function (hook, vm) {
            hook.beforeEach(function (html) {
              // 文档URL
              const fileUrl = `${REPO_URL}/blob/master/${vm.route.file}`;
              // 文档页脚
              const footer = [
                '<hr />',
                '<footer>',
                `<p><a href="${fileUrl}">文档</a>最后编辑时间 {docsify-updated}\n</p>`,
                `<p>Proudly published with <a href="${DOCSIFY_URL}" target="_blank">docsify</a> and <a href="${BUILDER_URL}" target="_blank">docsify</a>.</p>`,
                '</footer>',
              ].join('');
              // 组合
              return html + footer;
            });
          },
        ],
      };
    </script>
    <!-- Docsify v4 -->
    <script src="http://cdn.jsdelivr.net/npm/docsify@4"></script>
    <script src="http://cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
    <script src="http://cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
    <script src="http://unpkg.com/docsify-count/dist/countable.js"></script>
  </body>
</html>
